package net.xdclass.sqlsessionfactory;

import lombok.Data;

/**
 * @Classname DbBean
 * @Description TODO
 * @Date 2022/11/25 21:27
 * @Created by sunhao
 */
@Data
public class DbBean {
  /* 链接属性 */
  private String driverName = "com.mysql.cj.jdbc.Driver";

  private String url = "jdbc:mysql://localhost:3306/nacos?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true";

  private String userName = "root";

  private String password = "271544";

  private String poolName = "sunhao";// 连接池名字

  private int minConnections = 1; // 空闲池，最小连接数

  private int maxConnections = 10; // 空闲池，最大连接数

  private int initConnections = 5;// 初始化连接数

  private long connTimeOut = 1000;// 重复获得连接的频率

  private int maxActiveConnections = 100;// 最大允许的连接数，和数据库对应

  private long connectionTimeOut = 1000 * 60 * 20;// 连接超时时间，默认20分钟
}
